import java.util.Random;
import java.util.Scanner;

public class B {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		Random random = new Random();
		int[] a=new int[20];
		for (int i = 0; i < 20; i++) {
			a[i]=random.nextInt(10);
		}
		System.out.println("请输入一个数");
		int b=scanner.nextInt();
		System.out.println("你输入的数在随机数中有"+suiji(a,b)+"次");
	}
	public static int suiji(int a[],int b) {
		int sum=0;
		for (int i = 0; i < a.length; i++) {
			if (b==a[i]) {
				sum++;
			}
		}
		return sum;
	}
}